package com.woniuxy.base.service.impl;


import com.woniuxy.base.mapper.BaseCategoryRecordMapper;
import com.woniuxy.base.model.entity.BaseCategoryRecord;
import com.woniuxy.base.service.BaseCategoryRecordService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class BaseCategoryRecordServiceImpl implements BaseCategoryRecordService {
    @Resource
    private BaseCategoryRecordMapper recordMapper;
    @Override
    public void add(BaseCategoryRecord categoryRecord) {
        recordMapper.insert(categoryRecord);
    }

    @Override
    public List<BaseCategoryRecord> detail(Integer categoryId) {
        Map<String,Object> condition = new HashMap<>();
        condition.put("category_id", categoryId);
        return recordMapper.selectByMap(condition);
    }
}
